/* 主要样式变量 */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --text-light: #1f2937;
  --text-dark: #f3f4f6;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 通用动画 */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 活跃导航项样式 */
.nav-active {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  font-weight: 500;
}

.dark .nav-active {
  background-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* 工作流编辑器相关样式 */
.node {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-width: 150px;
  position: absolute;
  user-select: none;
}

.dark .node {
  background-color: #1f2937;
  border-color: #4b5563;
}

.connector {
  width: 12px;
  height: 12px;
  background-color: #3b82f6;
  border-radius: 50%;
  position: absolute;
  cursor: pointer;
}

.edge {
  stroke: #888;
  stroke-width: 2px;
  fill: none;
}

.dark .edge {
  stroke: #d1d5db;
}

.edge-animated {
  stroke-dasharray: 5;
  animation: dash 5s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -100;
  }
}

/* 卡片组件样式 */
.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.dark .card {
  background-color: #1f2937;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: #4338ca;
  color: white;
}

.btn-primary:hover {
  background-color: #3730a3;
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #1f2937;
}

.btn-secondary:hover {
  background-color: #cbd5e1;
}

/* 表单元素样式 */
.form-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
}

.dark .form-input {
  background-color: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

/* iframe 容器样式 */
#content-frame {
  height: calc(100vh - 2rem);
  width: 100%;
}

/* 基础样式 */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* 主内容区样式 */
main {
  height: 100vh;
}

main iframe {
  height: calc(100vh - 48px);
}

/* 工具提示样式 */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background-color: #1f2937;
  color: white;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(-0.25rem);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  aside {
    width: 3rem;
  }
  
  .menu-label {
    display: none;
  }
} 